package samples.d2.trames 
{
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import samples.BaseSample;
	import shapes.shapes2D.distribution.Disc;
	import shapes.shapes2D.distribution.Frame;
	import shapes.shapes2D.Dot;
	
	/**
	 * ...
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class FrameSample extends BaseSample
	{
		
		static private var jittering:Boolean = false;
		public function FrameSample( jitter:Number = 0 ) 
		{
			
			graphics.beginFill( color );
			
			
			var points:Vector.<Point> =	new Frame(  new Rectangle( 100, 100, sw - 200, sh - 200 ), 
													40, 
													40 )
													.distribute( false, (jittering ) ? jitter : 0 );
			
			jittering = ( !jittering ) ? true : false;
			var d:Dot = new Dot();
			for each( var p:Point in points )
			{
				d.x = p.x;
				d.y = p.y;
				d.draw( graphics );
			}
			
		}
		
	}

}